<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>修改密码</title>
		<base href="<%=basePath%>">
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<style type="text/css">
		.actived{color:red;}
		.td{border:solid #add9c0; border-width:0px 1px 1px 0px; padding-left:10px; text}
		.textalign{text-align:right; width:20%;}
		.table{border:solid #add9c0; border-width:1px 0px 0px 1px;}
		</style>
		<link rel="stylesheet" type="text/css" href="<%=basePath%>css/jquery-ui.css">
		<%@ include file="/WEB-INF/jspf/taglibs.jspf"%>
		<%@ include file="/WEB-INF/jspf/statics.jspf"%>
		<link type="text/css" rel="stylesheet" href="<%=basePath%>/css/showBo.css" />
</head>
<body>
<%@include file="/WEB-INF/pages/common/header.jsp" %>
	<%@include file="/WEB-INF/pages/common/menu.jsp" %>
	<div id="rightqqqq" style="border-radius:5px;border:1px solidred;float:left;width:88%;height:10px;padding-left:4px;min-height:80%;overflow-y:hidden; overflow-x:hidden; ">
	<h1 style="font-size:20px;">密码修改</h1>
<div id="wrapper" style="width:100%;height:100%;">
    <div class="submit-form pusht" style="border:1px solid #000;padding-left:25%;padding-top:8%;padding-right:25%;padding-bottom:10%;"> 
        <form name="submit-form" id="submit-form" method="post" action="${ctx}/account/update_pwd" >
            <table class="form label-colored-form">
                    <tbody>
                    <tr class="sprite">
                        <td class="label-td"><label>原密码：</label></td>
                        <td><input type="password" name="loginPassword" id="loginPassword" maxlength="20" class="text required" style="width:200px;"><span style="color:red;"></span></td>
                    </tr>
                    <tr class="sprite">
                        <td class="label-td"><label>新密码：</label></td>
                        <td><input type="password" name="newLoginPassword" id="newLoginPassword" value="" maxlength="20" class="text required" style="width:200px;"><span style="color:red;"></span></td>
                    </tr>
                    <tr class="sprite">
                        <td class="label-td"><label>确认密码：</label></td>
                        <td><input type="password" name="repPassword" id="repPassword" value="" class="text required" maxlength="20" style="width:200px;"><span style="color:red;"></span></td>
                    </tr>
                    <tr class="sprite">
                        <td class="label-td"><label></label></td>
                        <td>
                            <button class="btn btn-primary" id="btn_confirm">修改</button>
                        </td>
                    </tr>
                    </tbody>
            </table>
        </form>
    </div>
    </div>
</div>
</body>
</html>
<script type="text/javascript" src="<%=basePath%>/js/showBo.js"></script>
<script type="text/javascript" src="${ctx }/js/jquery.validate.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
	    $('#navigation').accordion({
				header: '.head',
				navigation1: true, 
				event: 'click',
				fillSpace: true,
				active:2,
				animated: 'bounceslide'
		});
		$("a[class='actived']").removeAttr("class");
		$("#updatePwd").attr("class", "actived");
		var result = $("#submit-form").validate({  
			   rules: {
				   loginPassword:{
					   remote:{                                          //验证用户名是否存在
					　　               type:"POST",
					　　               url:"account/check_loginPassword",             //servlet
					　　               dataType: "json", 
					　　               data:{
					　　              	 loginPassword:function(){return $("#loginPassword").val();}
					　　               } 
					　　              } 
				   },
					repPassword:{
						 equalTo: "#newLoginPassword"
	       	        }
	       	   },  
	       	   messages: {  
	       		  loginPassword: {  
	       	         required: '请输入原密码',
	       	         remote:"原密码输入错误"
	       	      },
	       	      newLoginPassword:{
	       	    	required: '请输入新密码'  
	       	      },
	       	      repPassword:{
	      	    	required: '请再输入一遍',
	      	    	equalTo: '两次密码输入不一致'
	      	      }
	       	   }
	       	});
		
		$("#btn_confirm").click(function(){
			 if($("#submit-form").valid()){
			     $("#submit-form").submit();
			 }
		});
		
		
		if(${message!=null}){
			Showbo.Msg.alert('${message}');	
		}
    });

</script>